package com.hznc.wcs.vo.modbusconfig;

import com.diboot.core.binding.annotation.*;
import com.diboot.core.vo.FileVO;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamOrg;
import com.diboot.iam.entity.IamPosition;
import com.diboot.iam.entity.IamRole;
import com.diboot.iam.entity.IamUser;
import com.diboot.file.entity.FileRecord;
import com.hznc.wcs.entity.modbusconfig.ModbusSignalPosition;
import com.hznc.wcs.entity.modbusconfig.ModbusSlaveConfig;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.util.List;
import java.time.LocalDate;

/**
 * Modbus信号点位 VO定义
 * @author MyName
 * @version 1.0
 * @date 2024-12-19
 * Copyright © MyCorp
 */
@Getter
@Setter
@Accessors(chain = true)
public class ModbusSignalPositionListVO extends ModbusSignalPosition {

    private static final long serialVersionUID = 1824116379728384489L;

    /**
     * 功能码 关联字典选项
     */
    @BindDict(type = "modbusFun", field = "fun")
    private LabelValue funLabel;

    /**
     * 读写 关联字典选项
     */
    @BindDict(type = "dataOperation", field = "readWriteAccess")
    private LabelValue readWriteAccessLabel;

    /**
     * 创建人 关联信息
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.create_by = id")
    private String createByLabel;

    /**
     * 更新人 关联信息
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.update_by = id")
    private String updateByLabel;

    /**
     * slave配置 关联信息
     */
    @BindField(entity = ModbusSlaveConfig.class, field = "name", condition = "this.config_id = id")
    private String configIdLabel;
}
